﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MODEL
{
    public partial class qgzx_cwy_volunteer
    {
        #region 纯的实体对象 + ToPOCO()
        /// <summary>
        /// 纯的实体对象
        /// </summary>
        /// <returns></returns>
        public qgzx_cwy_volunteer ToPOCO()
        {
            qgzx_cwy_volunteer poco = new qgzx_cwy_volunteer()
            {
                VolunteerId = this.VolunteerId,
                GeneralId = this.GeneralId,
                StudentNum = this.StudentNum,
                StudentName = this.StudentName,
                IsHeadman = this.IsHeadman,
                ToGroup = this.ToGroup,
                WorkDays = this.WorkDays,
                AbsentDays = this.AbsentDays,
                ReplaceDays = this.ReplaceDays,
                RunningDays = this.RunningDays,
                VocationDays = this.VocationDays,
                OrdinaryVocation = this.OrdinaryVocation,
                SpareLost = this.SpareLost,
                SparePay = this.SparePay,
                FinalWage = this.FinalWage,
                Deeds = this.Deeds,
                Punishment = this.Punishment,
                IsExcellent = this.IsExcellent
            };
            return poco;
        }
        #endregion

        #region 1.0 生成 TViewModel 实体对象 +ToViewModel
        /// <summary>
        /// 生成 很纯洁的 实体对象
        /// </summary>
        /// <returns></returns>
        public ViewModel.CywVolunteer ToViewModel()
        {
            ViewModel.CywVolunteer poco = new ViewModel.CywVolunteer()
            {
                VolunteerId = this.VolunteerId,
                GeneralId = this.GeneralId,
                StudentNum = this.StudentNum,
                StudentName = this.StudentName,
                IsHeadman = this.IsHeadman,
                ToGroup = this.ToGroup,
                WorkDays = this.WorkDays,
                AbsentDays = this.AbsentDays,
                ReplaceDays = this.ReplaceDays,
                RunningDays = this.RunningDays,
                VocationDays = this.VocationDays,
                OrdinaryVocation = this.OrdinaryVocation,
                SpareLost = this.SpareLost,
                SparePay = this.SparePay,
                FinalWage = this.FinalWage,
                Deeds = this.Deeds,
                Punishment = this.Punishment,
                IsExcellent = this.IsExcellent
            };
            return poco;
        }
        #endregion
    }
}
